package com.t2t.top.action.$17chain;

/**
 * 责任链模式
 * <p/>
 * 描述：请求在这条链上传递，直到某一对象决定处理该请求
 * <p/>
 * 场景：滤器
 */
public class Test {

    public static void main(String[] args) {
        MyHandler h1 = new MyHandler("h1");
        MyHandler h2 = new MyHandler("h2");
        MyHandler h3 = new MyHandler("h3");

        h1.setHandler(h2);
        h2.setHandler(h3);

        h1.operator();
    }
}  